<?php session_start();

	include "connect.php";
			
	$nick=$_SESSION['nick'];
	$title=$_POST[title];
	$content=$_POST[content];

	$query = "INSERT INTO post (writer, title, content) VALUES ('$nick','$title','$content')";
	if(!mysql_query($query,$connect)) die('Error: '.mysql_error());
	mysql_close($connect);
			
	header('Location: qna.php');
?>
